package blt.app_core.api.journey;

import blt.app_core.api.base.bean.OAuth;
import blt.app_core.api.base.bean.State;
import blt.app_core.api.journey.bean.AppealInfo;
import blt.app_core.api.journey.bean.Travel;
import blt.app_core.api.journey.bean.TravelDetail;
import blt.app_core.api.login.bean.Cookie;
import blt.app_core.utils.UriProdiver;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Url;

/**
 * Created by xgp on 2017/6/22.
 */

public interface JourneyService {

    /**
     * 获取行程列表
     * @param page
     * @param pageSize
     * @return
     */
    @POST(UriProdiver.TRAVEL_LIST)
    @FormUrlEncoded
    Call<State<Travel>> getTravel(@Field("page") int page, @Field("pageSize") int pageSize);

    @POST(UriProdiver.TRAVEL_LIST)
    @FormUrlEncoded
    Call<State<Travel>> getTravel(@Field("page") int page, @Field("pageSize") int pageSize,
                                  @Field("isInvoice") boolean isInvoice);
    @POST(UriProdiver.TRAVEL_LIST)
    @FormUrlEncoded
    Call<State<Travel>> getRefundTravel(@Field("page") int page, @Field("pageSize") int pageSize,
                                  @Field("isRefund") boolean isRefund);


    @POST(UriProdiver.TRAVEL_DETAIL)
    @FormUrlEncoded
    Call<State<TravelDetail>> getTravelDetail(@Field("id") int id);

    @POST(UriProdiver.LOOT_RED_PACKAGE)
    @FormUrlEncoded
    Call<State<String>> snatchRedpacket(@Field("travelOrderId") int orderId);


    /**
     * 申诉
     */

    @POST()
    @FormUrlEncoded
    Call<State> addComplaint(@Url String url, @Field("travelOrderId") int travelOrderId, @Field("appealDetail") String appealDetail,
                             @Field("pic1") String pic1, @Field("pic2") String pic2, @Field("pic3") String pic3,
                             @Field("contact") String contact, @Field("phone") String phone, @Field("reason") String reason);

    @POST(UriProdiver.APPEAL_INFO)
    @FormUrlEncoded
    Call<OAuth<AppealInfo>> getAppeal(@Field("pageNum") int page, @Field("pageSize") int size);

    @POST(UriProdiver.APPEAL_DETAIL)
    @FormUrlEncoded
    Call<State<AppealInfo>> getAppealDetail(@Field("id") int appealId);

}
